package com.yunwaikeji.gy_tool_library_test

import android.content.Context
import android.os.Bundle
import com.yunwaikeji.gy_tool_library.mvvm.net.GYRetrofitClient
import com.yunwaikeji.gy_tool_library.mvvm.view.activity.GYRefreshActivity

class MainActivity : GYRefreshActivity<BaseModel, LoginViewModel>() {
    override fun getLayoutId(): Int = R.layout.activity_main

    override fun initView(savedInstanceState: Bundle?) {
        loadRootFragment(R.id.mFrameLayout, MainFragment())
        showTopBar(false)
        mViewAdmin.setSmartRefresh(false,false)
        GYRetrofitClient.getInstance()
            .setBaseUrl("http://www.yunwaikeji.com:7001")
            .setRequestResult { request ->
                request.newBuilder()
                    .addHeader("Token", "dbjakdnjak")
                    .build()
            }
            .setResponseResult {
                null
            }
            .finish()
    }

    override fun initViewDelayed(savedInstanceState: Bundle?) {
    }

    override fun initData(refresh: Boolean) {
    }

    override fun initDataObserver(context: Context) {

    }
}